package com.lening.iot.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseController;
import com.lening.iot.dto.AccontrolDTO;
import com.lening.iot.dto.ParkinglotDTO;
import com.lening.iot.po.ParkinglotPO;
import com.lening.iot.service.ParkinglotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.reactive.function.client.WebClient;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 15:00
 */
@RestController
@RequestMapping("/parkinglots")
public class ParkinglotController extends BaseController<ParkinglotPO, ParkinglotDTO, ParkinglotService> {
    @Autowired(required = false)
    private WebClient webClient;

    @Autowired
    private ParkinglotService parkinglotService;
    @GetMapping("/getAllPkl")
    public Page<ParkinglotDTO> getAllAcl(Page<ParkinglotDTO> parkinglotDTOPage){
        Page<ParkinglotDTO> pklList = parkinglotService.getAllPkl(parkinglotDTOPage);
        return pklList;
    }

//    @Override
//    public Page<?> page(ParkinglotDTO parkinglotDTO) {
//        return parkinglotService.getAllPkl(parkinglotDTO);
//    }
@GetMapping("/getAll")
public List<ParkinglotDTO> getAll(String communityName) {
return parkinglotService.getAll(communityName);
}
}
